<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:core="http://www.contact.core.com/contacts/core/ui"
      xmlns:atria="http://www.atria.cz/common/jsf"
        >


<!--@elvariable id="searchResult" type="rs.contacts.core.core.searcher.entity.FriendResult"-->
<ui:component>
    <style type="text/css">
        .a1 A:link {
            text-decoration: none;
            color: #20205e;
        }

        .a1 A:visited {
            text-decoration: none;
            color: #20205e;
        }

        .a1 A:active {
            text-decoration: none;
            color: yellow;
        }

        .a1 A:hover {
            text-decoration: none;
            background: #20205e;
            font-style: italic;
            color: white;
        }

        .profileLink A:link {
            text-decoration: none;
            color: #20205e;
        }

        .profileLink A:visited {
            text-decoration: none;
            color: #20205e;
        }

        .profileLink A:active {
            text-decoration: none; /*color: yellow;*/
        }

        .profileLink A:hover {
            text-decoration: underline;
        }

        table.noborder td {
            border: 0px;
        }
    </style>
    <a4j:outputPanel layout="block" style="width:100%" styleClass="topDownMargin">
        <rich:panel style="overflow:auto; width:100%; border:none" bodyClass="rich-laguna-panel-no-header">
            <a4j:outputPanel layout="block">

                <a4j:outputPanel layout="block" style="float:left;">
                    <a4j:outputPanel layout="block" onclick="additionalOperation();" style="float:left;">
                        <!--<h:graphicImage value="./style/images/noImage.PNG" style="resize:both; width: 100px;"/>-->
                        <core:pictureForView style="resize:both; width: 100px;"
                                             pictureKey="photoprofile_#{searchResult.id}"
                                             additionalFunction="additionalOperation"/>
                        <a4j:jsFunction name="additionalOperation"
                                        reRender="loginModalPanel"
                                        action="#{welcome.prepareToViewProfile}"
                                        oncomplete="Richfaces.showModalPanel('loginModalPanel');"
                                        limitToList="true">
                            <f:setPropertyActionListener value="#{searchResult.id}"
                                                         target="#{welcomeSessionBean.informationIdForView}"/>
                        </a4j:jsFunction>
                    </a4j:outputPanel>
                    <a4j:outputPanel styleClass="profileLink" layout="block" style="float:right;">
                        <h:panelGrid columns="2" styleClass="noborder">
                            <h:outputLabel value="#{resources.nameLabel}:" style="color:gray;"/>

                            <a4j:commandLink value="#{searchResult.firstName} #{searchResult.lastName}"
                                             reRender="loginModalPanel"
                                             action="#{welcome.prepareToViewProfile}"
                                             oncomplete="Richfaces.showModalPanel('loginModalPanel');"
                                             limitToList="true">
                                <f:setPropertyActionListener value="#{searchResult.id}"
                                                             target="#{welcomeSessionBean.informationIdForView}"/>
                            </a4j:commandLink>


                        </h:panelGrid>

                    </a4j:outputPanel>
                </a4j:outputPanel>
                <a4j:outputPanel styleClass="a1" layout="block" style="float:right;">

                    <a4j:outputPanel layout="block" style="float:right;">
                        <h:panelGrid styleClass="noborder" columns="1">


                            <a4j:commandLink value="#{resources.sendAMessageLabel}"
                                             reRender="loginModalPanel"
                                             action="#{welcome.prepareToViewSearch}"
                                             oncomplete="Richfaces.showModalPanel('loginModalPanel');"
                                             limitToList="true"/>

                            <rich:separator height="2" width="100%"/>
                            <a4j:commandLink value="#{resources.viewFriendsLabel}"
                                             reRender="loginModalPanel"
                                             action="#{welcome.prepareToViewSearch}"
                                             oncomplete="Richfaces.showModalPanel('loginModalPanel');"
                                             limitToList="true"/>

                        </h:panelGrid>
                    </a4j:outputPanel>
                </a4j:outputPanel>
            </a4j:outputPanel>

        </rich:panel>
    </a4j:outputPanel>


</ui:component>


</html>